package study.spring.core.listener;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class CustomListener implements ApplicationListener<CustomEvent> {
  protected final Log log = LogFactory.getLog(getClass());

  @Override
  public void onApplicationEvent(CustomEvent event) {
    log.warn("执行CustomListener的onApplicationEvent方法");
  }
}
